The present invention relates to database systems. More specifically, the present invention relates to methods for simulating data types within a database system.
In conventional relational databases, all data are stored in named tables. The tables are described by their features. In other words, the rows of each table contain items of identical type, and the definitions of the columns of the table (i.e., the column names and the data types stored in the column) describe the attributes of each of the instances of the object. By identifying its name, its column names and the data types of the column contents, a table is completely described. Queries to a relational database are formulated in a query language. One such language is SQL (Structure Query Language) which is widely used in commercial relational data base systems. The data types offered by SQL can be classified as character arrays (names), numbers, and data types related to date and time.
Another recent technology for database systems is referred to as object oriented database systems. These systems offer more complex data types than those associated with conventional relational databases. In the context of object oriented data base models, an “object” includes both data and the functions (or methods) which can be applied to the object. Each object is a concrete instance of an object class defining the attributes and methods of all its instances. Each instance has its unique identifier by which it can be referred to in the database.
Yet another recent technology for database systems is referred to as object-relational (O-R) database systems. Generally speaking, object-relational database systems attempt to combine the advantages of the wide acceptance of relational databases and the benefits of the object oriented paradigm. There are generally two variants of O-R systems: one adds the capabilities to the database management system itself; the other is external to the database and addresses the “impedance mismatch” between objects and relational tables. Unless and until objects run in the database, such systems will be necessary. Some of these databases employ a data model that attempts to add object oriented characteristics to tables. All persistent (database) information is still in tables, but some of the tabular entries can have richer data structure.
The typical object-relational database is still relational because data is stored in tables of rows and columns, and SQL, with some extensions, is typically the language for data definition, manipulation, and query. As opposed to a strictly relational database system, however, an object-relational database system allows queries and commands to be made through an object oriented interface.
Certain object oriented languages for database management are known to include an ability to expand a data type system to include new and/or specialized data types. However, certain relational database languages, including many versions of SQL, do not accommodate creation of these new and/or specialized data types. In the context of object-relational database systems, it is not uncommon that queries expressed against objects are not allowed to reference custom data types. This is typically because the custom data types referenced in the context of the object system are not properly associated with any data types stored within the corresponding relational database system. This outcome is undesirable because, in some instances, the format of a data type utilized by the relational portion of the object-relational system is functionally inconvenient as compared to an alternate format that is supported by the object portion of the system. In other instances, the format of a data type utilized by the relational portion is structured to not meet a system operator's format expectations. In many cases, the object portion of an object-relational system is capable of supporting data types having a more effective or intuitive format than the data types supported by corresponding relational databases.